import { createApp } from 'vue'
import App from './index.vue'
import 'virtual:windi.css'
import 'virtual:svg-icons-register'
import 'amfe-flexible/index.js'
import i18n from './lang'
import SvgIcon from '@/components/SvgIcon/index.vue' // svg组件
import { JSEncrypt } from 'jsencrypt'
const app = createApp(App)
app.config.globalProperties.$encrypt = function (code: string) {
  const encrypt = new JSEncrypt()
  encrypt.setPublicKey(
    'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3JFF4wp7OAJUzJ+9ebr5gMRcLIwrQH44kiUDnCfoEFrWFufRKECpcMA4EzYjbh19Zjfr39qQr94yYUEkQsFa025qgU11YArAOCipoZVyZBS8MbzAMFjd5o58CgdadWr2TzfK9tdn43iMJybiRF0EiVaTdiZkCwhOO+JzfQxEqXQIDAQAB'
  )
  return encrypt.encrypt(code)
}


app.component('svg-icon', SvgIcon)
app.use(i18n).mount('#app')
